import request from '../../utils/request';
let baseRequest_url = "http://127.0.0.1:4890/portal";
//  --------------------------------------------------------------------------------------------------------------- //
// 服务项目树型列表查询
export const fetchProjectTreeData = query => {
    return request({
        url: baseRequest_url+'/admin/service/findServiceProjectTreeList',
        method: 'get',
    });
};
// 服务项目列表查询
export const findActiveServiceProjectList = query => {
    return request({
        url: baseRequest_url+'/admin/service/findActiveServiceProjectListPage',
        method: 'get',
        params: query,
    });
};
export const findServiceProjectListPage = query => {
    return request({
        url: baseRequest_url+'/admin/service/findServiceProjectListPage',
        method: 'get',
        params: query,
    });
};  
// 服务项目详情查询
export const findServiceProjectById = query => {
    return request({
        url: baseRequest_url+'/admin/service/findServiceProjectById/'+query,
        method: 'get',
    });
};
// 获取服务项目的父级列表信息
export const findServiceProjectParentList = query => {
    return request({
        url: baseRequest_url+'/admin/service/findServiceProjectParentList',
        method: 'get',
    });
};
// 服务项目配置启用状态
export const configServiceProjectDisable = data => {
    return request({
        url: baseRequest_url+'/admin/service/configServiceProjectDisable',
        method: 'post',
        data: data
    });
};

// 新增编辑服务项目
export const saveServiceProject = data => {
    return request({
        url: baseRequest_url+'/admin/service/saveServiceProject',
        method: 'post',
        data: data
    });
};
// 删除服务项目
export const deleteServiceProjectById = data => {
    return request({
        url: baseRequest_url+'/admin/service/deleteServiceProjectById/'+data,
        method: 'post',
        data: data
    });
};